home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 5 / QRZ Ham Radio Callsign Database - Volume 5.iso / files / amiga / csrc720j.lzh / port.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-01-11  |  1.9 KB  |  61 lines

  1. /* port.h header for KISS */
  2. #include <exec/ports.h>
  3.  
  4. /*
  5. Worst case length of a message is when writing a message composed
  6. entirely of escape characters
  7. */
  8. #define MAXLEN 550
  9. struct kiss_msg {
  10.    struct Message cm;      /* This must be first */
  11.    short channel;          /* When sent to reader this is a command */
  12.    short msgsize;          /* Number of data bytes in msg[] */
  13.    char rport;
  14.    char rstream;
  15.    char junk[4];           /* Eight bytes precede the actual message */
  16.    char fend;
  17.    char cmd;               /* and can be used for any purpose */
  18.    char port;              /* KAM host mode uses the last 4 for the */
  19.    char stream;            /* fend, command, port and stream bytes */
  20.    unsigned char msg[MAXLEN];
  21. };
  22.  
  23. struct regd  {
  24.    struct kiss_msg mp;       /* This must be first */
  25.    struct regd *fwd;
  26. };
  27.  
  28.  
  29. /* Port names. In wa8ded only the ctl-name is used. */
  30. #define CTL_NAME "VE5VA-HOST"
  31. #define WRT_NAME "VE5VA-WRITE"
  32.  
  33. /* Commands for processes registering or otherwise communicating with
  34.    the control process
  35. */
  36. #define K_MONITOR    1
  37. #define K_REGISTER   2
  38. #define K_SHUTUP     3
  39. #define K_WRT_DATA   4  /* Normal data - needs escape processing */
  40. #define K_WRT_CMND   5
  41. #define K_BEEP       6
  42. #define K_SHUTDOWN   7
  43. #define K_WRT_RAW    8  /* Guaranteed that escape processing not needed */
  44. #define K_GET_STAT   9
  45.  
  46.  
  47. #define B_GET_STAT   1
  48.  
  49.  
  50.  
  51. /* The original CBBS code is written such that if a process does a
  52.    lock, that lock applies to all of them. But that is not really
  53.    necessary. It could have different locks, one for each code segment
  54.    so that if one piece of code locks out the others from writing into
  55.    the mail file, there's no reason why another process could not be
  56.    writing in the BID file using a different lock. If I have time I'll
  57.    implement different locks for each one.
  58.    Better yet, remove all file operations from the BBS altogether and
  59.    make them separate processes which control who does what when.
  60. */
  61.